package com.mshop.util;

public class QL {
	public static final class HQL {

		public static final class Users {
			public static final String FIND_BY_NAME = "from Users m WHERE m.name=?";
		}
		
		public static final class Mobile {
			public static final String LIST="from Mobile m order by m.id desc";
			public static final String GET_COUNT = "SELECT COUNT(*) FROM Mobile m";
			public static final String FIND_BY_MOBILE = "from Mobile m where m.mobile=?";
			public static final String LIST_JIANG = "from Mobile m where m.jiangpin!='-1' order by m.id desc";
		}

		public static final class Shop{
			public static final String LIST = "from Shop m order by m.id desc";
			public static final String GET_COUNT = "SELECT COUNT(*) FROM Shop m";
		}
		
		public static class MANAGER {
			public static final String LIST = "from Manager m ORDER BY m.id DESC";
			public static final String FIND_BY_NAME = "from Manager m where m.name=?";
			public static final String GET_COUNT = "SELECT COUNT(*) FROM Manager m";;
		}
		
		public static final class SYSPOWER {
			public static final String LIST = "FROM SysPower m WHERE m.managerId=?";
			public static final String DELETE_BY_MENUID = "DELETE FROM SysPower m WHERE m.sysMenuId=?";
			public static final String DELETE_BY_MANAGERID = "DELETE FROM SysPower m WHERE m.managerId=?";
		}

		public static final class SYSMENU {
			public static final String LIST = "FROM SysMenu m WHERE m.fatherId=? order by m.idx";
			public static String LIST_BY_POWER = "FROM SysMenu m WHERE m.fatherId=? and m.id in(SELECT s.sysMenuId FROM SysPower s WHERE s.managerId=?) order by m.idx";
		}

		public static final class Guize {

			public static final String LIST =  "from Guize m order by m.id desc";
			
			
		}

		public static final class Jiangpin {

			public static final String LIST ="from Jiangpin m order by m.id desc";
			
		}
		
	}

}